package com.mysen.sso.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.mysen.sso.dao.mapper.UserMapper;
import com.mysen.sso.model.User;

@Repository
public class UserDao {
	@Autowired
	private UserMapper mapper;

    public List<User> selectByPage(User record){
        return mapper.selectByPage(record);
    }
    
    public Integer selectByPageCount(User record){
    	return mapper.selectCount(record);
    }

    public int deleteById(String id){
        return mapper.deleteById(id);
    }

    public int insert(User record){
        return mapper.insert(record);
    }

    public User selectById(String id){
        return mapper.selectById(id);
    }

    public int updateById(User record){
        return mapper.updateById(record);
    }

	public int addRoles(User user) {
        return mapper.addRoles(user);
	}

}
